Documents, such as documents in the Portable Document Format (PDF), allow various objects (e.g., images) to be inserted within the documents and also allow these objects to overlap within the displayed document. Different blend modes can be defined for objects in a document that determine what color is displayed in overlapped portions of the objects. The color in the overlapped portions is sometime referred to as the “result color” or “resultant color.” For PDF documents, the default blend mode is the “Normal” blend mode, while the “Multiply” blend mode is the most commonly used blend mode from among the various ones supported by PDF reference standard.
The different blend modes for objects in document are often not supported directly on graphics processing unit (GPU) hardware and are instead performed in software using fragment shaders of the GPU to perform the calculation. This software implementation is slow as compared to hardware blending. What is needed is a way to perform color blending of objects using GPU hardware.